using System;
using System.Collections.Generic;
using System.Text;
namespace BTSPracCourse.Maps.Scripts
{
    public class GreenShiledScripts
    {

        public string GetNewPrice(string manfCode, string provPrice, string manfPrice, string wholePrice)
        {
            float markup = 1.0f;
            float baseprice = 1.0f;
            try
            {
                markup = 1.0f + GetManMarkup(manfCode);
                baseprice = float.Parse(provPrice.Trim());
                if (baseprice == 0.0f)
                {
                    baseprice = float.Parse(manfPrice.Trim());
                    if (baseprice == 0.0f)
                    {
                        baseprice = float.Parse(wholePrice.Trim());
                    }
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex.Message);
            }
            float result = baseprice * markup;
            return result.ToString("0000.0000");
        }
        private float GetManMarkup(string manfCode)
        {
            float result = 0.2f;
            return result;
        }
    }
}
